package base.exa17;

public class StartWithStudy {
    public static void main(String[] args) {
        boolean a,b,c,d;
        String tom="天气预报";
        String jerry = "比赛终止";
        a=tom.startsWith("天气");//a的值为true
        b=jerry.startsWith("天气");//b的值为flase
        c=tom.endsWith("终止");//c的值是false
        d=jerry.endsWith("终止");//d的值是true
        System.out.println("a: "+a);
        System.out.println("b: "+b);
        System.out.println("c: "+c);
        System.out.println("d: "+d);
    }
}
